<template>
<div class="product">
  <img class="banner" src="@/assets/images/login/banner.jpg" alt="">
  <span class="title">香港美心鸡蛋卷448g原味进口网红休闲零食新年货糕点黄油送礼盒装香港美心鸡蛋卷448g原味进口网红休闲零食新年货糕点黄油送礼盒装</span>
  <span class="price">¥88.09</span>
</div>
</template>

<script>
export default {
  name: "shop-product"
}
</script>

<style scoped lang="less">
.product {
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  &:hover {
    box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
  }
  .banner {
   display: block;
    width: 100%;
    border-radius: 4px;
  }
  .title {
    display: block;
    margin-top: 8px;
    color: @t-text-color;
    font-size: 12px;
    white-space: pre-line; /*允许换行*/
    overflow: hidden;
    text-overflow: ellipsis; /*省略号*/
    display: -webkit-box;
    -webkit-box-orient: vertical; /*行向垂直排列*/
    -webkit-line-clamp: 2; //*限制2
    &:hover {
      color: @primary-color;
    }
  }
  .price {
    display: block;
    margin-top: 8px;
    margin-bottom: 2px;
    color: @t-title-color;
    font-size: 16px;
    font-weight: 500;
  }
  .num {
    color: @t-text-color;
    font-size: 12px;
    font-weight: 500;
  }

  .shop-name {
    display: flex;
    align-items: center;
    margin-top: 4px;
    .logo {
      display: block;
      margin-right: 6px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
    }
    .name {
      color: @t-text-color;
      font-size: 12px;
      font-weight: 500;
    }
  }
}
</style>